#include "st_inf.h"
#include "ui_st_inf.h"
#include<QSqlQuery>

st_inf::st_inf(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::st_inf)
{
    ui->setupUi(this);
}

st_inf::~st_inf()
{
    delete ui;
}

//返回管理员操作界面
void st_inf::on_return_2_clicked()
{
    this->close();
}

//删除学生信息界面
void st_inf::on_delete_2_clicked()
{

    delete_st=new DELETE_st(this);
    delete_st->setWindowTitle("删除学生信息");
    delete_st->show();

    QSqlQuery query;
    query.exec("select id,name from st");
    while(query.next()){
        QString id=query.value(0).toString();
        QString name=query.value(1).toString();
        delete_st->ui->comboBox->addItem(id+"  "+name);
    }
}

void st_inf::on_pushButton_clicked()
{
    ui->label->setText("数据导入成功！");


}
